import numpy as np
import sys
from utils.read_info import read_input


def calc_mean_var(input_file):
    """
    计算均值和方差
    :param input_file: 输入文件
    :return:
    """

    input_info = read_input(input_file)
    input_info = [float(line) for line in input_info]

    input_info_mean = np.mean(input_info)
    input_info_var = np.power(input_info, 2).mean()
    print('{} {} {}'.format(len(input_info), input_info_mean, input_info_var))


if __name__ == '__main__':
    input_file = sys.stdin
    calc_mean_var(input_file)
